Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text

Public Module OperatingSystemUtil

    ' Windows 7 RTM is 6.1.7100
    Private WINDOWS_7_VERSION As OperatingSystem
    Private os As OperatingSystem = Nothing

    Sub New()
        WINDOWS_7_VERSION = New OperatingSystem(PlatformID.Win32NT, New Version(6, 1))
        os = Environment.OSVersion
    End Sub

    Public Function MeetsOrExceedsWin7() As Boolean
        Return MeetsOrExceedsWin7(WINDOWS_7_VERSION)
    End Function

    Public Function MeetsOrExceedsWin7(ByVal platformVersion As OperatingSystem) As Boolean
        If os.Platform <> platformVersion.Platform OrElse os.Version < platformVersion.Version Then
            Return False
        Else
            Return True
        End If
    End Function
End Module
